{% extends "base.html" %}

{% block content %}

<script language="javascript" src="/static/js/jquery-1.2.1.pack.js" type="text/javascript"></script>
<script language="javascript" src="/static/js/tab.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/jquery-calendar-pack.js" ></script>
<style type="text/css">@import url(/static/css/jquery-calendar.css);</style>
<script language="javascript" type="text/javascript">
$(document).ready(
	function()
	{
    	popUpCal.regional['zh-cn'] = {dateFormat: 'DMY/'};
		popUpCal.setDefaults(popUpCal.regional['zh-cn']);
	    $('#birthday').calendar({autoPopUp: 'focus',yearRange: '-50:+0'});
	    $('#start_date').calendar({autoPopUp: 'focus',yearRange: '-5:+0'});
	    $('#acceptance_date').calendar({autoPopUp: 'focus',yearRange: '-5:+0'});
	    $('#application_date').calendar({autoPopUp: 'focus',yearRange: '-5:+0'});

	    $('#agent_id').change(function(){
		    var selText = $("#agent_id option:selected").text();
	    	if(selText=='Referred'){
	    		$('#refereeinfo').css('display','block');
	    	}else{
	    		$('#refereeinfo').css('display','none');
	    	}
		    
	    })
	    var selText = $("#agent_id option:selected").text();
    	if(selText=='Referred'){
    		$('#refereeinfo').css('display','block');
    	}else{
    		$('#refereeinfo').css('display','none');
    	}
	}
);
function getfullname()
{
	document.getElementById('fullname').value=document.getElementById('last_name').value+", "+document.getElementById('first_name').value;
}

function verify(form){
  if(form.student_id.value==""){
	alert("Enter the student_id please!");
       return false;
	}
  if(form.first_name.value==""&&form.last_name.value==""){
	alert("Enter the first name or last name please!");
       return false;
	}
	return true;
 }

 </script>
 <style>
 .list-div {
  width: 96%;
  border: 1px solid #BBDDE5;
}
.list-div table {
  border: 1px solid #BBDDE5;
}
.list-div th {
  line-height: 24px;
  background: #BBDDE5 url("/static/images/th_bg.gif") repeat-x;
  white-space: nowrap;
}

.list-div td {
  line-height: 22px;
}
tr.over td {background:#F4FAFB;  /*这个将是鼠标高亮行的背景臿/
} 
</style>

<!-- start goods form -->
<div class="tab-div">
    <!-- tab bar -->
    <div id="tabbar-div">
      <p>
        <span class="tab-front" id="general-tab">{%if student.last_name%}{{student.last_name}} , {{student.first_name}}{%else%}{{student.name_ch}}{%endif%} Profile</span><span
        class="tab-back" id="detail-tab"><a href="/v2/program_enrolled/{{student.id}}/">{%if student.last_name%}{{student.last_name}} , {{student.first_name}}{%else%}{{student.name_ch}}{%endif%} Program Enrolled</a></span><span
        class="tab-back" id="mix-tab"><a href="/v2/pay_record/{{student.id}}/">{%if student.last_name%}{{student.last_name}} , {{student.first_name}}{%else%}{{student.name_ch}}{%endif%} Payment Record</a></span>
      </p>
    </div>
	<form name='form1' id='form1' action="" method='post' enctype="multipart/form-data">
    <div id="tabbody-div" class="list-div">
		<table width="100%" border="0">
		  <tr>
			<td width="40%">
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Student ID&nbsp;&nbsp;<input type="text" name="student_id" id="student_id" value="{{student.student_id}}" style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Appellation&nbsp;&nbsp;<select name="appellation" id="appellation">
						<option value="">Select Please</option>
						<option value="Mr" {%if student.appellation == 'Mr'%}selected{%endif%}>Mr.</option>
						<option value="Mrs" {%if student.appellation == 'Mrs'%}selected{%endif%}>Mrs.</option>
						<option value="Ms" {%if student.appellation == 'Ms'%}selected{%endif%}>Ms.</option>
						<option value="Dr" {%if student.appellation == 'Dr'%}selected{%endif%}>Dr.</option>
						<option value="Ir" {%if student.appellation == 'Ir'%}selected{%endif%}>Ir.</option>
						</select></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">First Name&nbsp;&nbsp;<input type="text" name="first_name" id="first_name" value="{{student.first_name}}" onfocus="getfullname()" onmouseout="getfullname()"  style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Last Name&nbsp;&nbsp;<input type="text" name="last_name" id="last_name" value="{{student.last_name}}" onfocus="getfullname()" onmouseout="getfullname()"  style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Full Name&nbsp;&nbsp;<input type="text" name="fullname" id="fullname" value="{{student.last_name}} , {{student.first_name}}" readonly  style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Date of Birth&nbsp;&nbsp;<input type="text" name="birthday" id="birthday" value="{{student.birthday}}" /> </td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Nationality&nbsp;&nbsp;
					<select name="country" id="country">
					<option value="">select please</option>
					<option value="American / North American" {%if student.country == 'American / North American'%}selected{%endif%}>American / North American</option>
					<option value="Australian" {%if student.country == 'Australian'%}selected{%endif%}>Australian</option>
					<option value="Austrian" {%if student.country == 'Austrian'%}selected{%endif%}>Austrian</option>
					<option value="Algerian" {%if student.country == 'Algerian'%}selected{%endif%}>Algerian</option>
					<option value="Afghani / Afghan" {%if student.country == 'Afghani / Afghan'%}selected{%endif%}>Afghani / Afghan</option>
					<option value="Argentinian" {%if student.country == 'Argentinian'%}selected{%endif%}>Argentinian</option>
					<option value="Belgian" {%if student.country == 'Belgian'%}selected{%endif%}>Belgian</option>
					<option value="Bolivian" {%if student.country == 'Bolivian'%}selected{%endif%}>Bolivian</option>
					<option value="Bulgarian" {%if student.country == 'Bulgarian'%}selected{%endif%}>Bulgarian</option>
					<option value="Brazilian" {%if student.country == 'Brazilian'%}selected{%endif%}>Brazilian</option>
					<option value="Bengali" {%if student.country == 'Bengali'%}selected{%endif%}>Bengali</option>
					<option value="Batswana" {%if student.country == 'Batswana'%}selected{%endif%}>Batswana</option>
					<option value="Chinese" {%if student.country == 'Chinese'%}selected{%endif%}>Chinese</option>
					<option value="Chilean" {%if student.country == 'Chilean'%}selected{%endif%}>Chilean</option>
					<option value="Costa Rican" {%if student.country == 'Costa Rican'%}selected{%endif%}>Costa Rican</option>
					<option value="Cuban" {%if student.country == 'Cuban'%}selected{%endif%}>Cuban</option>
					<option value="Canadian" {%if student.country == 'Canadian'%}selected{%endif%}>Canadian</option>
					<option value="Congolese" {%if student.country == 'Congolese'%}selected{%endif%}>Congolese</option>
					<option value="Cambodian" {%if student.country == 'Cambodian'%}selected{%endif%}>Cambodian</option>
					<option value="Colombian" {%if student.country == 'Colombian'%}selected{%endif%}>Colombian</option>
					<option value="Czech / Czechoslovakian" {%if student.country == 'Czech / Czechoslovakian'%}selected{%endif%}>Czech / Czechoslovakian</option>
					<option value="Denmark" {%if student.country == 'Denmark'%}selected{%endif%}>Denmark</option>
					<option value="Danish" {%if student.country == 'Danish'%}selected{%endif%}>Danish</option>
					<option value="English" {%if student.country == 'English'%}selected{%endif%}>English</option>
					<option value="Ethiopian" {%if student.country == 'Ethiopian'%}selected{%endif%}>Ethiopian</option>
					<option value="Egyptian" {%if student.country == 'Egyptian'%}selected{%endif%}>Egyptian</option>
					<option value="Ecuadorian" {%if student.country == 'Ecuadorian'%}selected{%endif%}>Ecuadorian</option>
					<option value="French" {%if student.country == 'French'%}selected{%endif%}>French</option>
					<option value="Finnish" {%if student.country == 'Finnish'%}selected{%endif%}>Finnish</option>
					<option value="German" {%if student.country == 'German'%}selected{%endif%}>German</option>
					<option value="Greek" {%if student.country == 'Greek'%}selected{%endif%}>Greek</option>
					<option value="Ghanaian" {%if student.country == 'Ghanaian'%}selected{%endif%}>Ghanaian</option>

					<option value="Hong Kong" {%if student.country == 'Hong Kong'%}selected{%endif%}>Hong Kong</option>
					<option value="Hungarian" {%if student.country == 'Hungarian'%}selected{%endif%}>Hungarian</option>
					<option value="Holland" {%if student.country == 'Holland'%}selected{%endif%}>Holland</option>
					<option value="Italian" {%if student.country == 'Italian'%}selected{%endif%}>Italian</option>
					<option value="Irish" {%if student.country == 'Irish'%}selected{%endif%}>Irish</option>
					<option value="Indian" {%if student.country == 'Indian'%}selected{%endif%}>Indian</option>
					<option value="Iraqi / Iraqui" {%if student.country == 'Iraqi / Iraqui'%}selected{%endif%}>Iraqi / Iraqui</option>
					<option value="Iranian" {%if student.country == 'Iranian'%}selected{%endif%}>Iranian</option>
					<option value="Indonesian" {%if student.country == 'Indonesian'%}selected{%endif%}>Indonesian</option>
					<option value="Japanese" {%if student.country == 'Japanese'%}selected{%endif%}>Japanese</option>
					<option value="Jamaican" {%if student.country == 'Jamaican'%}selected{%endif%}>Jamaican</option>

					<option value="Korean" {%if student.country == 'Korean'%}selected{%endif%}>Korean</option>
					<option value="Kuwaiti" {%if student.country == 'Kuwaiti'%}selected{%endif%}>Kuwaiti</option>
					<option value="Kenyan" {%if student.country == 'Kenyan'%}selected{%endif%}>Kenyan</option>
 
					<option value="Libyan" {%if student.country == 'Libyan'%}selected{%endif%}>Libyan</option>
					<option value="Lebanese" {%if student.country == 'Lebanese'%}selected{%endif%}>Lebanese</option>
					<option value="Mauritian" {%if student.country == 'Mauritian'%}selected{%endif%}>Mauritian</option>
					<option value="Maltese" {%if student.country == 'Maltese'%}selected{%endif%}>Maltese</option>
					<option value="Mongolian" {%if student.country == 'Mongolian'%}selected{%endif%}>Mongolian</option>
					<option value="Malaysian" {%if student.country == 'Malaysian'%}selected{%endif%}>Malaysian</option>
					<option value="Morrocan" {%if student.country == 'Morrocan'%}selected{%endif%}>Morrocan</option>
					<option value="Mexican" {%if student.country == 'Mexican'%}selected{%endif%}>Mexican</option>
					<option value="Namibian" {%if student.country == 'Namibian'%}selected{%endif%}>Namibian</option>
					<option value="Nigerien" {%if student.country == 'Nigerien'%}selected{%endif%}>Nigerien</option>
					<option value="Nigerian" {%if student.country == 'Nigerian'%}selected{%endif%}>Nigerian</option>
					<option value="Nicaraguan" {%if student.country == 'Nicaraguan'%}selected{%endif%}>Nicaraguan</option>

					<option value="Nepalese" {%if student.country == 'Nepalese'%}selected{%endif%}>Nepalese</option>
					<option value="North Korean" {%if student.country == 'North Korean'%}selected{%endif%}>North Korean</option>
					<option value="Norwegian" {%if student.country == 'Norwegian'%}selected{%endif%}>Norwegian</option>
					<option value="Phillipino" {%if student.country == 'Phillipino'%}selected{%endif%}>Phillipino</option>
					<option value="Portuguese" {%if student.country == 'Portuguese'%}selected{%endif%}>Portuguese</option>
					<option value="Pakistani" {%if student.country == 'Pakistani'%}selected{%endif%}>Pakistani</option>
					<option value="Polish" {%if student.country == 'Polish'%}selected{%endif%}>Polish</option>
					<option value="Peruvian" {%if student.country == 'Peruvian'%}selected{%endif%}>Peruvian</option>
					<option value="Panamanian" {%if student.country == 'Panamanian'%}selected{%endif%}>Panamanian</option>
					<option value="Paraguayan" {%if student.country == 'Paraguayan'%}selected{%endif%}>Paraguayan</option>
					<option value="Romanian" {%if student.country == 'Romanian'%}selected{%endif%}>Romanian</option>
					<option value="Scottish" {%if student.country == 'Scottish'%}selected{%endif%}>Scottish</option>
					<option value="Spanish" {%if student.country == 'Spanish'%}selected{%endif%}>Spanish</option>
					<option value="Syrian" {%if student.country == 'Syrian'%}selected{%endif%}>Syrian</option>
					<option value="Swiss" {%if student.country == 'Swiss'%}selected{%endif%}>Swiss</option>
					<option value="Swedish" {%if student.country == 'Swedish'%}selected{%endif%}>Swedish</option>
					<option value="Saudi Arabian" {%if student.country == 'Saudi Arabian'%}selected{%endif%}>Saudi Arabian</option>
					<option value="South Korean" {%if student.country == 'South Korean'%}selected{%endif%}>South Korean</option>
					<option value="Sudanese" {%if student.country == 'Sudanese'%}selected{%endif%}>Sudanese</option>
					<option value="Somali" {%if student.country == 'Somali'%}selected{%endif%}>Somali</option>
					<option value="South African" {%if student.country == 'South African'%}selected{%endif%}>South African</option>
					<option value="Salvadorian" {%if student.country == 'Salvadorian'%}selected{%endif%}>Salvadorian</option>
					<option value="Turkish" {%if student.country == 'Turkish'%}selected{%endif%}>Turkish</option>
					<option value="Taiwanese" {%if student.country == 'Taiwanese'%}selected{%endif%}>Taiwanese</option>
					<option value="Thai" {%if student.country == 'Thai'%}selected{%endif%}>Thai</option>
					<option value="Turkman (Turkmenian)" {%if student.country == 'Turkman (Turkmenian)'%}selected{%endif%}>Turkman (Turkmenian)</option>
					<option value="Uruguayan" {%if student.country == 'Uruguayan'%}selected{%endif%}>Uruguayan</option>
					<option value="Venezuelan" {%if student.country == 'Venezuelan'%}selected{%endif%}>Venezuelan</option>
					<option value="Welsh" {%if student.country == 'Welsh'%}selected{%endif%}>Welsh</option>
					</td>
				  </tr>
				</table>

				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Home Phone&nbsp;&nbsp;<input type="text" name="tel_h" id="tel_h" value="{{student.tel_h}}"  style="width:250px;" /></td>
				  </tr>
				</table>

				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Cell Phone&nbsp;&nbsp;<input type="text" name="tel_m" id="tel_m" value="{{student.tel_m}}"  style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Office Phone&nbsp;&nbsp;<input type="text" name="tel_o" id="tel_o" value="{{student.tel_o}}"  style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Email 1.&nbsp;&nbsp;<input type="text" name="email" id="email" value="{{student.email}}" style="width:250px;" /><br>Email 2.&nbsp;&nbsp;<input type="text" style="width:250px;" name="email2" id="email2" value="{{student.email2}}" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Home Address&nbsp;&nbsp;<textarea name="address"  id="address"cols="35" rows="3">{{student.address}}</textarea><input type="checkbox" name="emsaddress" id="emsaddress" value="1" {%if student.emsvalue == 1%}checked{%endif%} {%if student.emsvalue == 3%}checked{%endif%} /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Name of Employer&nbsp;&nbsp;<input type="text" name="employer" id="employer" value="{{student.employer}}"  style="width:250px;"  /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Title/Position&nbsp;&nbsp;<input type="text" name="title" id="title" value="{{student.title}}"  style="width:250px;"  /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td align="left" bgcolor="#E1FBFB">Industry&nbsp;&nbsp;<select name="industry" id="industry">
						<option value="">Select Please</option>
						<option value="Accounting/Audit/Taxation" {%if student.industry == 'Accounting/Audit/Taxation'%}selected{%endif%}>Accounting/Audit/Taxation</option>
						<option value="Advertising&Marketing" {%if student.industry == 'Advertising&Marketing'%}selected{%endif%}>Advertising&Marketing</option>
						<option value="Architecture/Interior Design/Surveying" {%if student.industry == 'Architecture/Interior Design/Surveying'%}selected{%endif%}>Architecture/Interior Design/Surveying</option>
						<option value="Banking & Construction" {%if student.industry == 'Banking & Construction'%}selected{%endif%}>Banking & Construction</option>
						<option value="Building & Construction" {%if student.industry == 'Building & Construction'%}selected{%endif%}>Building & Construction</option>
						<option value="Civil & Social Services" {%if student.industry == 'Civil & Social Services'%}selected{%endif%}>Civil & Social Services</option>
						<option value="Education & Training" {%if student.industry == 'Education & Training'%}selected{%endif%}>Education & Training</option>
						<option value="Engineering & Technical Services" {%if student.industry == 'Engineering & Technical Services'%}selected{%endif%}>Engineering & Technical Services</option>
						<option value="Entertainment / Recreation / Sports" {%if student.industry == 'Entertainment / Recreation / Sports'%}selected{%endif%}>Entertainment / Recreation / Sports</option>
						<option value="Hotels / Catering / Food & Beverage" {%if student.industry == 'Hotels / Catering / Food & Beverage'%}selected{%endif%}>Hotels / Catering / Food & Beverage</option>
						<option value="Information Technology" {%if student.industry == 'Information Technology'%}selected{%endif%}>Information Technology</option>
						<option value="Insurance" {%if student.industry == 'Insurance'%}selected{%endif%}>Insurance</option>
						<option value="Investment & Securities" {%if student.industry == 'Investment & Securities'%}selected{%endif%}>Investment & Securities</option>
						<option value="Logistics, Warehousing & Transportation" {%if student.industry == 'Logistics, Warehousing & Transportation'%}selected{%endif%}>Logistics, Warehousing & Transportation</option>
						<option value="Manufacturing - Electronics" {%if student.industry == 'Manufacturing - Electronics'%}selected{%endif%}>Manufacturing - Electronics</option>
						<option value="Manufacturing - Garment / Textile / Apparel" {%if student.industry == 'Manufacturing - Garment / Textile / Apparel'%}selected{%endif%}>Manufacturing - Garment / Textile / Apparel</option>
						<option value="Manufacturing - General" {%if student.industry == 'Manufacturing - General'%}selected{%endif%}>Manufacturing - General</option>
						<option value="Media / Publishing / Printing" {%if student.industry == 'Media / Publishing / Printing'%}selected{%endif%}>Media / Publishing / Printing</option>
						<option value="Hospital / Pharmaceuticals / Medial Services" {%if student.industry == 'Hospital / Pharmaceuticals / Medial Services'%}selected{%endif%}>Hospital / Pharmaceuticals / Medial Services</option>
						<option value="Trading / Import & Export" {%if student.industry == 'Trading / Import & Export'%}selected{%endif%}>Trading / Import & Export</option>
						<option value="Property / Real Estate" {%if student.industry == 'Property / Real Estate'%}selected{%endif%}>Property / Real Estate</option>
						<option value="Public Utilities" {%if student.industry == 'Public Utilities'%}selected{%endif%}>Public Utilities</option>
						<option value="Retails & Wholesale" {%if student.industry == 'Retails & Wholesale'%}selected{%endif%}>Retails & Wholesale</option>
						<option value="Others" {%if student.industry == 'Others'%}selected{%endif%}>Others</option>
						</select></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Management Level</td>
					<td><select name="mlevel" id="mlevel">
						<option value="">Select Please</option>
						<option value="Top" {%if student.mlevel == 'Top'%}selected{%endif%}>Top (e.g:CEO,COO,CFO)</option>
						<option value="Senior" {%if student.mlevel == 'Senior'%}selected{%endif%}>Senior (e.g: VP.SVP)</option>
						<option value="Middle" {%if student.mlevel == 'Middle'%}selected{%endif%}>Middle (e.g: Director,Manager)</option>
						<option value="Junior" {%if student.mlevel == 'Junior'%}selected{%endif%}>Junior(e.g:Supervisor,Officer,Foreman)</option>
						</select></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Office Address</td>
					<td><textarea name="officeaddress"  id="officeaddress"cols="35" rows="3">{{student.officeaddress}}</textarea><input type="checkbox" name="emsaddress" id="emsaddress" value="2" {%if student.emsvalue == 2%}checked{%endif%} {%if student.emsvalue == 3%}checked{%endif%} /></td>
				  </tr>
				</table>

			</td>
			<td width="40%" valign="top">
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Application Date</td>
					<td><input type="text" name="application_date" id="application_date" value="{{student.application_date_str}}" readonly style="margin-left:15px;" /> </td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Acceptance Date</td>
					<td><input type="text" name="acceptance_date" id="acceptance_date" value="{{student.acceptance_date_str}}" readonly style="margin-left:15px;" /> </td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Start Date</td>
					<td><input type="text" name="start_date" id="start_date" value="{{student.start_date_str}}" readonly style="margin-left:15px;" /> </td>
				  </tr>
				</table>

				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Program Enrolled 1.</td>
					<td>
						<select name="pro_id" id="pro_id">
						<option value="0">select please</option>
						{%for p in pj%}
						<option value="{{p.id}}" {%if student.program == p%}selected{%endif%}>{{p.name}}</option>
						{%endfor%}
						</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Sale Representative</td>
					<td>
						<select name="saleperson_id" id="saleperson_id">
						<option value="0">select please</option>
						{%for s in sales%}
						<option value="{{s.id}}" {%if student.salesperson == s%}selected{%endif%}>{{s.name}}</option>
						{%endfor%}
						</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Program Enrolled 2</td>
					<td>
						<select name="program2" id="program2">
						<option value="0">select please</option>
						{%for p in pj%}
						<option value="{{p.name}}" {%if student.program2 == p.name%}selected{%endif%}>{{p.name}}</option>
						{%endfor%}
						</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Sale Representative</td>
					<td>
						<select name="sale2" id="sale2">
						<option value="0">select please</option>
						{%for s in sales%}
						<option value="{{s.name}}" {%if student.sale2 == s.name%}selected{%endif%}>{{s.name}}</option>
						{%endfor%}
						</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Education Background</td>
					<td>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#ffffff"><input type="checkbox" name="educb" id="educb" value="1" {%if student.edu1%}checked{%endif%} />
					</td>
					<td>
					<select name="edu1" id="edu1">
					<option value="">select please</option>
					<option value="PhD/Doctorial" {%if student.edu1 == 'PhD/Doctorial'%}selected{%endif%}>PhD/Doctorial</option>
					<option value="Master" {%if student.edu1 == 'Master'%}selected{%endif%}>Master</option>
					<option value="Bachelor" {%if student.edu1 == 'Bachelor'%}selected{%endif%}>Bachelor</option>
					<option value="Associate Degree" {%if student.edu1 == 'Associate Degree'%}selected{%endif%}>Associate Degree</option>
					<option value="HighDip/Diploma/Certificate" {%if student.edu1 == 'HighDip/Diploma/Certificate'%}selected{%endif%}>HighDip/Diploma/Certificate</option>
					</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Awarding</td>
					<td><input type="text" name="awarding1" id="awarding1" value="{{student.awarding1}}" style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">University</td>
					<td><input type="text" name="university1" id="university1" value="{{student.university1}}" style="width:250px;" /></td>
				  </tr>
				</table>

				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#ffffff"><input type="checkbox" name="educb" id="educb" value="1"  {%if student.edu2%}checked{%endif%} />
					</td>
					<td>
					<select name="edu2" id="edu2">
					<option value="">select please</option>
					<option value="PhD/Doctorial"  {%if student.edu2 == 'PhD/Doctorial'%}selected{%endif%}>PhD/Doctorial</option>
					<option value="Master" {%if student.edu2 == 'Master'%}selected{%endif%}>Master</option>
					<option value="Bachelor" {%if student.edu2 == 'Bachelor'%}selected{%endif%}>Bachelor</option>
					<option value="HighDip/Diploma/Certificate" {%if student.edu2 == 'HighDip/Diploma/Certificate'%}selected{%endif%}>HighDip/Diploma/Certificate</option>
					</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Awarding</td>
					<td><input type="text" name="awarding2" id="awarding2" value="{{student.awarding2}}" style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">University</td>
					<td><input type="text" name="university2" id="university2" value="{{student.university2}}" style="width:250px;" /></td>
				  </tr>
				</table>

				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#ffffff"><input type="checkbox" name="educb" id="educb" value="1"  {%if student.edu3%}checked{%endif%} />
					</td>
					<td>
					<select name="edu3" id="edu3">
					<option value="">select please</option>
					<option value="PhD/Doctorial"  {%if student.edu3 == 'PhD/Doctorial'%}selected{%endif%}>PhD/Doctorial</option>
					<option value="Master" {%if student.edu3 == 'Master'%}selected{%endif%}>Master</option>
					<option value="Bachelor" {%if student.edu3 == 'Bachelor'%}selected{%endif%}>Bachelor</option>
					<option value="HighDip/Diploma/Certificate" {%if student.edu3 == 'HighDip/Diploma/Certificate'%}selected{%endif%}>HighDip/Diploma/Certificate</option>
					</select>
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">Awarding</td>
					<td><input type="text" name="awarding3" id="awarding3" value="{{student.awarding3}}" style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="150" align="right" bgcolor="#E1FBFB">University</td>
					<td><input type="text" name="university3" id="university3" value="{{student.university3}}" style="width:250px;" /></td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr valign="center">
					<td width="150" align="right" bgcolor="#E1FBFB">Remark</td>
					<td>
						<textarea  name="remark" id="remark" style="width:250px;">{{student.remark}}</textarea>
					</td>
				  </tr>
				</table>
			</td>
			<td width="20%" valign="top">
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="100%" align="left" bgcolor="#fff">{%if student.pic%}<img src="/static/photos/user/avatar/{{student.id}}_i.{{student.pic}}?nowimte={{nowtime}}" border="0" width="64" />{%else%}<img src="/static/images/noavatar.gif" border="0" alt="noavatar" width="64" />{%endif%}<input type="file" name="pic" id="pic" size="5" /><br>&nbsp;Photo
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="100%" align="left" bgcolor="#fff">Attach CV : {%if student.attachcv%}<br><a href="/static/files/attach/{{student.attachcv}}">{{student.attachcv}}</a><br>{%endif%}<input type="file" name="attachcv" id="attachcv" size="5" />
					</td>
				  </tr>
				</table>
				<table width="100%" border="0" background="#FFF">
				  <tr>
					<td width="100%" align="left" bgcolor="#fff">Attach Application Form :{%if student.attachappform%}<BR><a href="/static/files/attach/{{student.attachappform}}">{{student.attachappform}}</a><br>{%endif%}<input type="file" name="attachappform" id="attachappform" size="5" />
					</td>
				  </tr>
				</table>
			</td>
		  </tr>
		</table>
		<table width="100%" border="0">
		  <tr>
			<td align="center">
						<input type="hidden" name="id" id="id" value="{{student.id}}" />
						<input type="hidden" name="back_url" value="/v2/stusearch" />
						&nbsp;<input type="submit" name="gosave" id="gosave" value=" Save " class="button" />&nbsp;&nbsp;<input type='button' class='button' id='back' value=' Back ' onclick="javascrip:history.back(1)"   /><font color='red'>{{err.errinfo}}</font></td>
		  </tr>
		</table>


	</div>
	</form>
</div>


{% endblock %}
